/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package FamousBallet;

import java.awt.Toolkit;

/**
 *<pre>
 File name  About.java
 * @author    <b><i>Yerong</i></b>
 * Instructor  Niko Culevski
 * Class       CS 141 B
 * Due date    11/29/2016
 * Assignment  Project_3
 * @version   1.0.1
 * Platform    PC, Windows 10, NetBeans 8.1
 *******************************************************************************
* About form shows the information of the copy right and some introductions to 
* the program.
 *******************************************************************************
 * Input:    none
 * Output:   Copyright info and Introductions
 *******************************************************************************
 * </pre>
 */
public class About extends javax.swing.JDialog {

    public About(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        //Set the form in the center of the screen
        this.setLocationRelativeTo(null);
        //Set the Calculate button as default. It fires when you press "Enter."
        this.getRootPane().setDefaultButton(exitJButton);
        //Set icon
        this.setIconImage(
        Toolkit.getDefaultToolkit().getImage("src/FamousBallet/Bunny.png"));
        aboutJTextArea.setCaretPosition(0);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        titleJPanel = new javax.swing.JPanel();
        title2JLabel = new javax.swing.JLabel();
        aboutJScrollPane = new javax.swing.JScrollPane();
        aboutJTextArea = new javax.swing.JTextArea();
        contentJPanel = new javax.swing.JPanel();
        exitJButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setMaximumSize(new java.awt.Dimension(500, 600));
        setMinimumSize(new java.awt.Dimension(500, 600));
        setPreferredSize(new java.awt.Dimension(500, 600));
        setResizable(false);
        setSize(new java.awt.Dimension(0, 0));
        getContentPane().setLayout(null);

        titleJPanel.setMaximumSize(new java.awt.Dimension(480, 150));
        titleJPanel.setMinimumSize(new java.awt.Dimension(480, 150));
        titleJPanel.setPreferredSize(new java.awt.Dimension(480, 150));

        title2JLabel.setFont(new java.awt.Font("Times New Roman", 1, 36)); // NOI18N
        title2JLabel.setText("Famous Ballets");

        javax.swing.GroupLayout titleJPanelLayout = new javax.swing.GroupLayout(titleJPanel);
        titleJPanel.setLayout(titleJPanelLayout);
        titleJPanelLayout.setHorizontalGroup(
            titleJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(titleJPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(title2JLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(141, Short.MAX_VALUE))
        );
        titleJPanelLayout.setVerticalGroup(
            titleJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(titleJPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(title2JLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(108, Short.MAX_VALUE))
        );

        getContentPane().add(titleJPanel);
        titleJPanel.setBounds(70, 0, 350, 60);

        aboutJScrollPane.setEnabled(false);

        aboutJTextArea.setEditable(false);
        aboutJTextArea.setColumns(20);
        aboutJTextArea.setFont(new java.awt.Font("Serif", 0, 15)); // NOI18N
        aboutJTextArea.setLineWrap(true);
        aboutJTextArea.setRows(5);
        aboutJTextArea.setText("Your ballet instructor has asked you to design a quick and easy program to keep track of the some pertinent data for famous ballets for her upcoming module in the ballet class she is offering. Currently no such program exists and it is difficult to update the information of the ballets.\nWrite a Java program that allows the user to manage a simple ballets database with ability to display, add, edit/modify, delete and search the ballets. Sample GUI is provided as one example of an implementation. There is a lot of flexibility however for your vision of how to design and implement this database, as long as your implementation has all of the required functionality.");
        aboutJTextArea.setMinimumSize(new java.awt.Dimension(144, 400));
        aboutJScrollPane.setViewportView(aboutJTextArea);

        getContentPane().add(aboutJScrollPane);
        aboutJScrollPane.setBounds(0, 60, 470, 280);

        contentJPanel.setMaximumSize(new java.awt.Dimension(480, 509));
        contentJPanel.setMinimumSize(new java.awt.Dimension(480, 509));
        contentJPanel.setPreferredSize(new java.awt.Dimension(480, 509));

        javax.swing.GroupLayout contentJPanelLayout = new javax.swing.GroupLayout(contentJPanel);
        contentJPanel.setLayout(contentJPanelLayout);
        contentJPanelLayout.setHorizontalGroup(
            contentJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 480, Short.MAX_VALUE)
        );
        contentJPanelLayout.setVerticalGroup(
            contentJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 509, Short.MAX_VALUE)
        );

        getContentPane().add(contentJPanel);
        contentJPanel.setBounds(70, 312, 260, 60);

        exitJButton.setBackground(new java.awt.Color(204, 204, 204));
        exitJButton.setMnemonic('C');
        exitJButton.setText("Exit");
        exitJButton.setToolTipText("Close the form.");
        exitJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitJButtonActionPerformed(evt);
            }
        });
        getContentPane().add(exitJButton);
        exitJButton.setBounds(140, 380, 148, 23);

        pack();
    }// </editor-fold>//GEN-END:initComponents

     /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * Method exitJButtonActionPerformed()
     * Dispose the form.
     * @param evt,the event
     * @see java.awt.event.ActionEvent
     * @return null
     * @author Yerong
     * Date: 11/29/2016
     */       
    private void exitJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitJButtonActionPerformed
        this.dispose();
    }//GEN-LAST:event_exitJButtonActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(About.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(About.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(About.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(About.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                About dialog = new About(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane aboutJScrollPane;
    private javax.swing.JTextArea aboutJTextArea;
    private javax.swing.JPanel contentJPanel;
    private javax.swing.JButton exitJButton;
    private javax.swing.JLabel title2JLabel;
    private javax.swing.JPanel titleJPanel;
    // End of variables declaration//GEN-END:variables
}
